package io.renren.sdapi.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.renren.membermanage.dto.ModelTrainParamDto;
import io.renren.membermanage.entity.GenerateLog;
import io.renren.sdapi.dto.httprequestparam.QueryHistoryDto;
import io.renren.sdapi.dto.httprequestparam.Text2ImageRequestParam;
import io.renren.sdapi.dto.httprequestparam.image2image.BaseParam;

import java.util.List;
import java.util.Map;

public interface StableDiffusionApiService {

    /**
     * Stable Diffusion API --> txt2img 调用
     */
    Map<String, List<String>> text2Image(Text2ImageRequestParam param, Long userId) throws Exception;

    /**
     * Stable Diffusion API --> image2image 调用
     */
    Map<String, List<String>> image2Image(BaseParam request, Long userId) throws Exception;

    String getLoraSsOutputName(String path);

    String analyzeWord(String word);

    String getLoraStr(List<Map<String, String>> lora);

    boolean refresh();

    String modelTrain(String modelTrainId, ModelTrainParamDto dto);

    Page<GenerateLog> getHistory(QueryHistoryDto dto);

    GenerateLog getOneHistory(Long id);
}
